package tictactoe.game;



import tictactoe.utils.StdIn;
import java.util.Random;

public class Game 
{
	public static void main(String[] args)
	{
		System.out.printf("For Human vs Human type \"1\"\n");
		System.out.printf("For Human vs Computer type \"2\"\n");
		System.out.printf("For Computer vs Computer type \"3\"\n");
		System.out.printf("\nSelect your game: ");
		
		int x;
		while(true)
		{
			x = StdIn.readInt();
			if (x<1 || x>3) System.out.printf("Select from above again: ");
			else break;
		}
		Model model = new Model(3, 3);
		ControllerInterface gm;
		if (x == 1) gm = new HvH(model);
		else gm = new HvC(model);
		Random rand = new Random();
		gm.play(rand.nextInt(2));
	}
}